import axios from '../../utils/request'
// 创建工单信息
export const workorderCreate = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/create',
        data
    })
}
// 编辑工单
export const workorderUpdate = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/update',
        data
    })
}
// 工单列表
export const workorderRead = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/read',
        data
    })
}
// 读取所有工单列表
export const workorderReadAll = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/readAll',
        data
    })
}
// 删除工单
export const workorderDelete = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/delete',
        data
    })
}
// 获取搜索词
export const findAllWorkOrderList = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findAllWorkOrderList',
        data
    })
}
// 获取订单接受者
export const findWorkOrderAndID = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findWorkOrderAndID',
        data
    })
}
// 根据用户获取相关订单
export const findOrderByUserID = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findworkOrderByUserID',
        data
    })
}
// 获取当前用户已受理的工单信息
export const findworkOrderByApprover = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findworkOrderByApprover',
        data
    })
}
// 获取当前用户创建的工单信息
export const findworkOrderByCreate = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findworkOrderByCreate',
        data
    })
}

// 获取当前用户关联的员工完成的工单信息
export const findoverworkOrderByfinish = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findoverworkOrderByfinish',
        data
    })
}
// 获取获取当前用户待审批的工单信息
export const findworkOrderByReview = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findworkOrderByReview',
        data
    })
}
// 获取获取当前用户超时的工单信息
export const findworkOrderByOverTime = (data) =>
{
    return axios({
        method: 'post',
        url: '/workorder/findworkOrderByOverTime',
        data
    })
}


